package AbstractTransactions

import (
	"PaySalary/Model"
	"fmt"
	"log"
)

type MethodTransaction interface {
	GetMethod() Model.PaymentMethod
}

type ChangeMethodTransaction struct {
	MethodTransaction
	Model.PaymentMethod
	ChangeEmployeeTransaction
}

func (cm *ChangeMethodTransaction) NewChangeMethodTransaction(empid int)  {
	cm.NewChangeEmployeeTransaction(empid)
}

func (cm *ChangeMethodTransaction)Change(e Model.Employee)  {
	pm := cm.GetMethod()
	e.SetItsPaymentMethod(pm)
}

func Pay(pc Model.Paycheck) {
	err := fmt.Errorf("The method or operation is not implemented.")
	log.Println(err.Error())
}